package com.lemon.cloud.admin.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.lemon.cloud.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
    * 字典表
    */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "sys_dict")
public class SysDict extends BaseEntity implements Serializable {
    @TableId(value = "id", type = IdType.INPUT)
    @Schema(description = "id")
    private Long id;

    /**
     * 类型
     */
    @TableField(value = "type")
    @NotEmpty(message = "类型不能为空")
    @Length(min = 1,max = 50,message = "类型长度为1~50字符")
    @Schema(description = "类型",minLength = 1,maxLength = 50)
    private String type;

    /**
     * 描述
     */
    @TableField(value = "description")
    @NotEmpty(message = "描述不能为空")
    @Length(min = 1,max = 50,message = "描述长度为1~50字符")
    @Schema(description = "描述",minLength = 1,maxLength = 50)
    private String description;

    /**
     * 备注
     */
    @TableField(value = "remark")
    @Schema(description = "备注")
    private String remark;

    /**
     * 字典类型
     */
    @TableField(value = "system_flag")
    @NotEmpty(message = "字典不能为空")
    @Schema(description = "字典类型")
    private String systemFlag;

    /**
     * 删除标记
     */
    @TableLogic
    private String delFlag;

    private static final long serialVersionUID = 1L;
}
